#ifndef MONITOR_H
#define MONITOR_H

#include <QWidget>
#include <QLabel>
#include <QHBoxLayout>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QDebug>

namespace Ui {
class Monitor;
}

class Monitor : public QWidget
{
    Q_OBJECT

public:
    explicit Monitor(QWidget *parent = 0);
    ~Monitor();
public slots:
    void onReadyread();
    void slotReadError(QNetworkReply::NetworkError);

private slots:
    void on_m_start_clicked();

    void on_m_stop_clicked();

    void on_m_photo_clicked();

    void on_pushButton_4_clicked();

private:
    Ui::Monitor *ui;
    QLabel *imgLab;
    QHBoxLayout hlayout;
    QNetworkAccessManager manager;
    QNetworkReply *reply;
    QByteArray streambuf;
    QLabel *errorLab;
    QHBoxLayout hlayout1;
    bool saveimg;
};

#endif // MONITOR_H
